package com.java01.misc.xml;

import java.io.FileReader;

import net.n3.nanoxml.IXMLElement;
import net.n3.nanoxml.IXMLParser;
import net.n3.nanoxml.StdXMLReader;
import net.n3.nanoxml.XMLParserFactory;
import net.n3.nanoxml.XMLWriter;

public class NanoXMLParser1 {

	public static void main(String[] args) throws Exception{
		IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
		
		parser.setReader(new StdXMLReader(new FileReader("D:/test.xml")));
	
		IXMLElement xml = (IXMLElement) parser.parse(); 
		XMLWriter writer = new XMLWriter(System.out); 
		writer.write(xml);
	}
}
